🔄 Watch Later List × AReminders
(
47
actions, 46 KB)
0 Comment
• https://developers.google.com/youtube/v3/docs/playlistItems#resource-representation • https://developers.google.com/youtube/v3/docs/videos#resource-representation
1 DataJar > GetValueIntent »
keyPath
:
My CMS.YouTube.myWatchLaterList.items
2 Repeat with Each in
[1 Value]
3 Get Dictionary Value for
contentDetails.videoId
in
[Repeat Item
as Dictionary
]
➔ videoId
»
4
31
38
4 Run Shortcut
Get Video Properties
➔ videoProperties
»
5
6
9
19
35
Input
:
[3 videoId]
Workflow
:
{ "workflowIdentifier": "DD93552C-03FA-48DC-9B11-1E532D961BC7", "workflowName": "Get Video Properties", "isSelf": false }
5 Get Dictionary Value for
snippet.channelTitle
in
[4 videoProperties]
➔ channelTitle
»
10
6 Get Dictionary Value for
contentDetails.duration
in
[4 videoProperties]
»
7 Run Shortcut
ISO8601Duration2Numbers
➔ videoDurationISO8601
»
Input
:
[6 Dictionary Value]
Workflow
:
{ "workflowIdentifier": "FFAB1F18-FFD2-4AB9-ADF4-22AD55781AB1", "workflowName": "ISO8601Duration2Numbers", "isSelf": false }
8 ToolboxProForShortcuts > PluraliseIntent »
10
word
:
min
count
:
[7 videoDurationISO8601
as Dictionary.durationInMinutes
]
output
:
numberDigit
9 Get Dictionary Value for
snippet.title
in
[4 videoProperties]
➔ videoTitle
»
10
32
10 Text
➔ reminderTitle
»
11
15
29
43
[8 Pluralised Result]
|
[5 channelTitle]
|
[9 videoTitle]
11 Match Text
TED
in
[10 reminderTitle]
»
12 If
[11 Matches]
has any value
13 Text
TED Talk
14 Otherwise
15 Match Text
commencement
in
[10 reminderTitle]
»
MatchTextCaseSensitive
:
false
16 If
[15 Matches]
has any value
17 Text
Inspiring Speech
18 Otherwise
19 Get Dictionary Value for
snippet.categoryId
in
[4 videoProperties]
»
20 Run Shortcut
YouTube - Get playlistItemID from videoID
➔ videoCategory
Input
:
[19 Dictionary Value]
Workflow
:
{ "workflowIdentifier": "12D1A133-5DF3-47DC-8388-3F9784B8F996", "workflowName": "YouTube - Get playlistItemID from videoID", "isSelf": false }
21 End If
22 End If ▵
14
»
23 Text
➔ parentReminderTitle
»
25
27
👉
[22 videoCategory]
24 Text
➔ ◻️ YouTube Video
»
25
27
32
43
◻️ YouTube Video
25 Find Reminders »
ContentItemLimitEnabled
:
true
ContentItemLimitNumber
:
1
ContentItemFilter
:
• All the following are true List is
[24 ◻️ YouTube Video]
Title is
[23 parentReminderTitle]
Is Completed Is Flagged
26 If
[25 Reminders]
does not have any value
27 Add New Reminder
[23 parentReminderTitle]
to Reminders with No Alert
CalendarDescriptor
:
[24 ◻️ YouTube Video]
28 End If »
29
32
44
29 Find Reminders »
ContentItemLimitEnabled
:
true
ContentItemLimitNumber
:
1
ContentItemFilter
:
• All the following are true Title is
[10 reminderTitle]
Is Completed
30 If
[29 Reminders]
does not have any value
31 URL
https://youtu.be/
[3 videoId]
➔ videoURL
»
32 Dictionary »
{ "reminderList": "
[24 ◻️ YouTube Video]
", "parentReminderTitle": "
[28 If Result]
", "brainFoodTitle": "
[9 videoTitle]
", "brainFoodURL": "
[31 videoURL]
" }
33 Dictionary »
{ "shortcutName": "😉 Enjoy Quality Brain Food", "shortcutInput": "
[32 Dictionary]
" }
34 Run Shortcut
Build Run Shortcut URL
»
43
Input
:
[33 Dictionary]
Workflow
:
{ "workflowIdentifier": "A4D0829E-EC6C-4E7E-8088-6EBD82EA8061", "workflowName": "Build Run Shortcut URL", "isSelf": false }
35 Get Dictionary Value for
snippet.thumbnails.default.url
in
[4 videoProperties]
➔ videoThumbnailURL
»
36 Get Contents of URL
[35 videoThumbnailURL]
»
37 Get Images from
[36 Contents of URL]
»
43
38 Run Shortcut
YouTube - Get commentThreads from videoID
»
Input
:
[3 videoId]
Workflow
:
{ "workflowIdentifier": "F2ABD12D-28A0-4420-850D-698FC2416716", "workflowName": "YouTube - Get commentThreads from videoID", "isSelf": false }
39 Repeat[2] with Each in
[38 Shortcut Result]
40 Get Dictionary Value for
snippet.topLevelComment.snippet.textOriginal
in
[Repeat Item 2]
»
41 Text
*
[40 Dictionary Value]
42 End Repeat[2] with Each »
43 Add New Reminder
[10 reminderTitle]
to Reminders with No Alert »
CalendarItemNotes
:
[42 Repeat Results]
Images
:
[37 Images]
CalendarDescriptor
:
[24 ◻️ YouTube Video]
URL
:
[34 Shortcut Result]
44
Set
Parent Reminder
of Reminder
[43 New Reminder]
ReminderContentItemParentReminder
:
[28 If Result]
45 End If ▵
30
46 End Repeat with Each ▵
2